﻿<UserControl x:Class="ICSharpCode.CodeQuality.Gui.DependencyMatrixView"
             xmlns:gui="clr-namespace:ICSharpCode.CodeQuality.Gui"
             xmlns:tv="http://icsharpcode.net/sharpdevelop/treeview"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<UserControl.Resources>
		<Style TargetType="{x:Type ToolTip}">
			<!-- http://www.mycsharp.de/wbb2/thread.php?postid=318921-->
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="VerticalOffset" Value="-50" />
			<Setter Property="HorizontalOffset" Value="20" />
			<Setter Property="Placement" Value="MousePoint" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ToolTip}">
						<Grid Name="Border" Background="Transparent" Width="{TemplateBinding Width}" Height="Auto">
							<Border BorderBrush ="Black" CornerRadius="5" BorderThickness="2" Background="WhiteSmoke"></Border>														
							<ContentPresenter Margin="10,10,10,10" HorizontalAlignment="Center" VerticalAlignment="Center" TextBlock.Foreground="Black" TextBlock.FontSize="12" />
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="1*" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="2*" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="1*" />
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="2*" />
		</Grid.ColumnDefinitions>
		
		<gui:NodeDescription  x:Name="inform"
			Grid.Row="0" Grid.Column="0"
			HorizontalAlignment="Stretch"
			VerticalAlignment="Stretch"></gui:NodeDescription>
		
		<!-- Top TreeView -->
		<tv:SharpTreeView Name="topTree" Grid.Column="2"
			ScrollViewer.HorizontalScrollBarVisibility="Visible"
			ScrollViewer.VerticalScrollBarVisibility="Hidden"
			MouseMove="TopTreeMouseMove"
			ScrollViewer.ScrollChanged="ViewScrollChanged">
			
			<tv:SharpTreeView.LayoutTransform>
				<RotateTransform Angle="-90"/>
			</tv:SharpTreeView.LayoutTransform>
		</tv:SharpTreeView>
		<!-- -->
		<GridSplitter Grid.Column="1"
		              Grid.RowSpan="3"
		              HorizontalAlignment="Center"
		              VerticalAlignment="Stretch"
		              ShowsPreview="True"
		              Width="5" />
		
		<!-- -->
		<GridSplitter Grid.Row="1"
		              Grid.ColumnSpan="3"
		              VerticalAlignment="Center"
		              HorizontalAlignment="Stretch"
		              ShowsPreview="True"
		              Height="5" />
		<!-- Left TreeView -->
		<tv:SharpTreeView Name="leftTree"
			Grid.Row="2"
			ScrollViewer.HorizontalScrollBarVisibility="Visible"
			ScrollViewer.VerticalScrollBarVisibility="Hidden"
			MouseMove="LeftTreeMouseMove"
			ScrollViewer.ScrollChanged="ViewScrollChanged">
		</tv:SharpTreeView>
		
		<ScrollViewer Name="scrollViewer"
		              HorizontalScrollBarVisibility="Visible"
		              VerticalScrollBarVisibility="Visible"
		              Grid.Row="2" Grid.Column="2"
		              CanContentScroll="True"
		              ScrollChanged="ViewScrollChanged">
			
			<gui:DependencyMatrixControl x:Name="matrix"
				HoveredCellChanged="MatrixHoveredCellChanged">
				<!--
				<gui:DependencyMatrixControl.ToolTip >
					<Border Margin="-4,0,-4,-3" Padding="10" Background="Red"
					        ToolTipService.ShowOnDisabled="True"
					        ToolTipService.Placement="MousePoint"
					 		ToolTipService.HorizontalOffset="10"					        
					        >										 
						<Border.BitmapEffect>
							<OuterGlowBitmapEffect></OuterGlowBitmapEffect>
						</Border.BitmapEffect>					
					</Border>
				
				</gui:DependencyMatrixControl.ToolTip>
			-->
			</gui:DependencyMatrixControl>
		</ScrollViewer>
	</Grid>
</UserControl>